package com.sunmouse.toolkit.util;

import android.support.v4.app.Fragment;

import com.sunmouse.toolkit.fragment.anim.AnimFragment;
import com.sunmouse.toolkit.fragment.anim.JumpBallFragment;
import com.sunmouse.toolkit.fragment.anim.ObjectAnimFragment;
import com.sunmouse.toolkit.fragment.anim.RotateBallFragment;
import com.sunmouse.toolkit.fragment.bluetooth.BluetoothFragment;
import com.sunmouse.toolkit.fragment.camera.Camera2Fragment;
import com.sunmouse.toolkit.fragment.camera.Camera3Fragment;
import com.sunmouse.toolkit.fragment.camera.CameraFragment;
import com.sunmouse.toolkit.fragment.camera.demo.TextureCameraFragment;
import com.sunmouse.toolkit.fragment.chart.BrokenFragment;
import com.sunmouse.toolkit.fragment.chart.BubbleFragment;
import com.sunmouse.toolkit.fragment.chart.ColumnFragment;
import com.sunmouse.toolkit.fragment.chart.ComboFragment;
import com.sunmouse.toolkit.fragment.chart.PieFragment;
import com.sunmouse.toolkit.fragment.control.CardFragment;
import com.sunmouse.toolkit.fragment.custom.AvatarFragment;
import com.sunmouse.toolkit.fragment.custom.CanvasFragment;
import com.sunmouse.toolkit.fragment.custom.ChoiceLayoutFragment;
import com.sunmouse.toolkit.fragment.custom.DemoViewFragment;
import com.sunmouse.toolkit.fragment.custom.DragFragment;
import com.sunmouse.toolkit.fragment.custom.DraggingFragment;
import com.sunmouse.toolkit.fragment.custom.LinearItemFragment;
import com.sunmouse.toolkit.fragment.custom.LoadBarFragment;
import com.sunmouse.toolkit.fragment.custom.PathTextFragment;
import com.sunmouse.toolkit.fragment.custom.RotateFragment;
import com.sunmouse.toolkit.fragment.custom.ShaderFragment;
import com.sunmouse.toolkit.fragment.custom.SnakeFragment;
import com.sunmouse.toolkit.fragment.custom.TimerFragment;
import com.sunmouse.toolkit.fragment.fashion.TitleListFragment;
import com.sunmouse.toolkit.fragment.home.HomeFragment;
import com.sunmouse.toolkit.fragment.home.MediaFragment;
import com.sunmouse.toolkit.fragment.home.MoreFragment;
import com.sunmouse.toolkit.fragment.home.SettingFragment;
import com.sunmouse.toolkit.fragment.material.MaterialFragment;
import com.sunmouse.toolkit.fragment.media.AlbumFragment;
import com.sunmouse.toolkit.fragment.custom.CustomFragment;
import com.sunmouse.toolkit.fragment.ftp.FTPFragment;
import com.sunmouse.toolkit.fragment.custom.DialogFragment;
import com.sunmouse.toolkit.fragment.media.FashionFragment;
import com.sunmouse.toolkit.fragment.media.MediaEditFragment;
import com.sunmouse.toolkit.fragment.media.MenuFragment;
import com.sunmouse.toolkit.fragment.other.LoadFragment;
import com.sunmouse.toolkit.fragment.other.OtherFragment;
import com.sunmouse.toolkit.fragment.other.ProviderFragment;
import com.sunmouse.toolkit.fragment.socket.SocketFragment;
import com.sunmouse.toolkit.fragment.web.WebFragment;
import com.sunmouse.toolkit.fragment.menu.DrawerFragment;
import com.sunmouse.toolkit.fragment.menu.GuillFragment;
import com.sunmouse.toolkit.fragment.menu.SlidingFragment;
import com.sunmouse.toolkit.fragment.menu.VpMenuFragment;
import com.sunmouse.toolkit.fragment.other.QRCodeFragment;
import com.sunmouse.toolkit.fragment.tv.ListFragment;
import com.sunmouse.toolkit.fragment.web.CssFragment;
import com.sunmouse.toolkit.fragment.web.JsFragment;
import com.sunmouse.toolkit.fragment.web.TestFragment;
import com.sunmouse.toolkit.fragment.web.ViewportFragment;


/**
 * Created by leiyun on 2018/5/4.
 */
public class PageUtil {

    /**
     * fragment mIndex
     */
    public static final class Index {
        public static final int MAIN = 0;
        public static final int CHOICE_LAYOUT = 1;
        public static final int MATERIAL = 2;
        public static final int HOME = 3;
        public static final int MEDIA = 4;
        public static final int MORE = 5;
        public static final int SETTING = 6;
        public static final int QR_CODE = 7;
        public static final int OBJ_ANIM = 8;
        public static final int LIST = 9;
        public static final int MENU = 10;
        public static final int OTHER = 11;
        public static final int CUSTOM = 12;
        public static final int NAV = 13;
        public static final int TV = 14;
        public static final int WEB = 15;
        public static final int CHART = 16;
        public static final int ANIM = 17;
        public static final int ALBUM = 18;
        public static final int DIALOG = 19;
        public static final int FTP = 20;
        public static final int CHAT = 21;
        public static final int SERVICE = 22;
        public static final int FASHION = 23;
        public static final int CONTROL = 24;
        public static final int BROKEN = 25;
        public static final int COLUMN = 26;
        public static final int PIE = 27;
        public static final int BUBBLE = 28;
        public static final int COMBO = 29;
        public static final int TIMER = 30;
        public static final int LINEAR_ITEM = 31;
        public static final int DRAGGING = 32;
        public static final int DRAG = 33;
        public static final int SHADER = 34;
        public static final int SNAKE = 35;
        public static final int DEMO_VIEW = 36;
        public static final int CANVAS = 38;
        public static final int AVATAR = 39;
        public static final int PATH_TEXT = 40;
        public static final int TITLE_LIST = 41;
        public static final int MEDIA_EDIT = 42;
        public static final int SLIDING = 43;
        public static final int DRAWER = 44;
        public static final int VP_MENU = 45;
        public static final int GUILL = 46;
        public static final int JS = 47;
        public static final int CSS = 48;
        public static final int VIEWPORT = 49;
        public static final int TEST = 50;
        public static final int RECORDER = 51;
        public static final int PLAYER = 52;
        public static final int ENCODER = 53;
        public static final int SOCKET = 54;
        public static final int JUMP_BALL = 55;
        public static final int ROTATE_BALL = 56;
        public static final int LOAD_BAR = 57;
        public static final int LOAD = 58;
        public static final int PROVIDER = 59;
        public static final int ROTATE = 60;
        public static final int CAMERA = 61;
        public static final int CAMERA_DEMO = 62;
        public static final int CAMERA2 = 63;
        public static final int CAMERA3 = 64;
        public static final int BLUETOOTH = 65;
    }


    /**
     * build fragment instance here
     */
    public static Fragment getFragment(int index) {
        Fragment f = null;
        switch (index) {
            case Index.MAIN:
//                f = new ChoiceLayoutFragment();
                break;
            case Index.CHOICE_LAYOUT:
                f = new ChoiceLayoutFragment();
                break;
            case Index.HOME:
                f = new HomeFragment();
                break;
            case Index.MEDIA:
                f = new MediaFragment();
                break;
            case Index.MORE:
                f = new MoreFragment();
                break;
            case Index.SETTING:
                f = new SettingFragment();
                break;
            case Index.MATERIAL:
                f = new MaterialFragment();
                break;
            case Index.QR_CODE:
                f = new QRCodeFragment();
                break;
            case Index.OBJ_ANIM:
                f = new ObjectAnimFragment();
                break;
            case Index.LIST:
                f = new ListFragment();
                break;
            case Index.ALBUM:
                f = new AlbumFragment();
                break;
            case Index.BROKEN:
                f = new BrokenFragment();
                break;
            case Index.COLUMN:
                f = new ColumnFragment();
                break;
            case Index.PIE:
                f = new PieFragment();
                break;
            case Index.BUBBLE:
                f = new BubbleFragment();
                break;
            case Index.COMBO:
                f = new ComboFragment();
                break;
            case Index.CONTROL:
                f = new CardFragment();
                break;
            case Index.CUSTOM:
                f = new CustomFragment();
                break;
            case Index.TIMER:
                f = new TimerFragment();
                break;
            case Index.LINEAR_ITEM:
                f = new LinearItemFragment();
                break;
            case Index.DRAGGING:
                f = new DraggingFragment();
                break;
            case Index.DRAG:
                f = new DragFragment();
                break;
            case Index.SHADER:
                f = new ShaderFragment();
                break;
            case Index.SNAKE:
                f = new SnakeFragment();
                break;
            case Index.DEMO_VIEW:
                f = new DemoViewFragment();
                break;
            case Index.CANVAS:
                f = new CanvasFragment();
                break;
            case Index.AVATAR:
                f = new AvatarFragment();
                break;
            case Index.PATH_TEXT:
                f = new PathTextFragment();
                break;
            case Index.TITLE_LIST:
                f = new TitleListFragment();
                break;
            case Index.FASHION:
                f = new FashionFragment();
                break;
            case Index.FTP:
                f = new FTPFragment();
                break;
            case Index.MEDIA_EDIT:
                f = new MediaEditFragment();
                break;
            case Index.SLIDING:
                f = new SlidingFragment();
                break;
            case Index.DRAWER:
                f = new DrawerFragment();
                break;
            case Index.VP_MENU:
                f = new VpMenuFragment();
                break;
            case Index.GUILL:
                f = new GuillFragment();
                break;
            case Index.JS:
                f = new JsFragment();
                break;
            case Index.CSS:
                f = new CssFragment();
                break;
            case Index.VIEWPORT:
                f = new ViewportFragment();
                break;
            case Index.TEST:
                f = new TestFragment();
                break;
            case Index.RECORDER:
                break;
            case Index.ENCODER:
                break;
            case Index.PLAYER:
                break;
            case Index.SOCKET:
                f = new SocketFragment();
                break;
            case Index.MENU:
                f = new MenuFragment();
                break;
            case Index.TV:
                f = new ListFragment();
                break;
            case Index.WEB:
                f = new WebFragment();
                break;
            case Index.ANIM:
                f = new AnimFragment();
                break;
            case Index.JUMP_BALL:
                f = new JumpBallFragment();
                break;
            case Index.ROTATE_BALL:
                f = new RotateBallFragment();
                break;
            case Index.LOAD_BAR:
                f = new LoadBarFragment();
                break;
            case Index.OTHER:
                f = new OtherFragment();
                break;
            case Index.LOAD:
                f = new LoadFragment();
                break;
            case Index.PROVIDER:
                f = new ProviderFragment();
                break;
            case Index.DIALOG:
                f = new DialogFragment();
                break;
            case Index.ROTATE:
                f = new RotateFragment();
                break;
            case Index.CAMERA:
                f = new CameraFragment();
                break;
            case Index.CAMERA_DEMO:
                f = new TextureCameraFragment();
                break;
            case Index.CAMERA2:
                f = new Camera2Fragment();
                break;
            case Index.CAMERA3:
                f = new Camera3Fragment();
                break;
            case Index.BLUETOOTH:
                f = new BluetoothFragment();
                break;
        }
        return f;
    }

}
